home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / oriel.arc / WINAPPS.ORL < prev    next >
Text File  |  1991-07-31  |  3KB  |  126 lines

  1. {---------------------------WINAPPS.ORL-----------------------------
  2.  This script sets up a front-end shell for launching Windows appli-
  3.  cations. It is called from DEMO.ORL.
  4.  -------------------------------------------------------------------}
  5. {Initialize variable}
  6.     Set Mouse_message = 0
  7.  
  8. {Maximize the window and set the caption}
  9.     SetWindow(MAXIMIZE)
  10.     UseCaption("Launch Windows Applications")
  11.  
  12. {Set up the menu}
  13.     SetMenu("&Applications",IGNORE,
  14.           "&Notepad",Do_Notepad,
  15.           "&Write",Do_Write,
  16.           "&Paintbrush",Do_Paintbrush,
  17.           "&Cardfile",Do_Cardfile,
  18.           "&PIF Editor",Do_PIFEdit,
  19.           "&SysEdit",Do_SysEdit,
  20.           ENDPOPUP,
  21.         "&Exit!",Shut_Down,
  22.           ENDPOPUP)
  23.  
  24. {Draw the background}
  25.     UseBackground(TRANSPARENT,255,0,128)    {Pink background}
  26.     DrawBackground
  27.  
  28. {Put large text and icon at top of screen}
  29.     UseFont("Tms Rmn",0,12,BOLD,NOITALIC,NOUNDERLINE,60,0,0)
  30.     DrawText(85,10,"Launch")
  31.     DrawText(52,25,"Windows Applications")
  32.  
  33. {Draw text boxes}
  34.     UseBrush(SOLID,255,255,255)    {White brush}
  35.     Set x1=72
  36.     Set x2=145
  37.     DrawRoundRectangle(x1,48,x2,60,2,2)
  38.     DrawRoundRectangle(x1,63,x2,75,2,2)
  39.     DrawRoundRectangle(x1,78,x2,90,2,2)
  40.     DrawRoundRectangle(x1,93,x2,105,2,2)
  41.     DrawRoundRectangle(x1,108,x2,120,2,2)
  42.     DrawRoundRectangle(x1,123,x2,135,2,2)
  43.  
  44. {Put the text in each box and a bitmap to left of each box}
  45.     UseFont("System",0,0,NOBOLD,ITALIC,NOUNDERLINE,0,0,0)
  46.     Set x=83
  47.     Set Bit_x=57
  48.     DrawBitmap(Bit_x,48,"WINICON.BMP")
  49.     DrawText(x,51,"Notepad")
  50.     DrawBitmap(Bit_x,63,"WINICON.BMP")
  51.     DrawText(x,66,"Write")
  52.     DrawBitmap(Bit_x,78,"WINICON.BMP")
  53.     DrawText(x,81,"Paintbrush")
  54.     DrawBitmap(Bit_x,93,"WINICON.BMP")
  55.     DrawText(x,96,"Cardfile")
  56.     DrawBitmap(Bit_x,108,"WINICON.BMP")
  57.     DrawText(x,111,"PIF Editor")
  58.     DrawBitmap(Bit_x,123,"WINICON.BMP")
  59.     DrawText(x,126,"SysEdit")
  60.  
  61. {Put directions box to the left of buttons}
  62.     UseBrush(SOLID,255,255,128)    {Cream-colored brush}
  63.     DrawRectangle(10,70,48,98)
  64.     UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  65.     DrawText(13,74,"Click on an")
  66.     DrawText(13,79,"item to the")
  67.     DrawText(13,84,"right or select")
  68.     DrawText(13,89,"a menu option")
  69.  
  70. {Set up mouse input}
  71.     SetMouse(72,48,145,60,Do_Notepad,Temp,Temp,    {Notepad button}
  72.          57,48,68,59,Do_Notepad,Temp,Temp,    {Notepad icon}
  73.          72,63,145,75,Do_Write,Temp,Temp,    {Write button}
  74.          57,63,68,74,Do_Write,Temp,Temp,    {Write icon}
  75.          72,78,145,90,Do_Paintbrush,Temp,Temp,    {Paintbrush button}
  76.          57,78,68,89,Do_Paintbrush,Temp,Temp,    {Paintbrush icon}
  77.          72,93,145,105,Do_Cardfile,Temp,Temp,    {Cardfile button}
  78.          57,93,68,104,Do_Cardfile,Temp,Temp,    {Cardfile icon}
  79.          72,108,145,120,Do_PIFEdit,Temp,Temp,    {PIF Editor button}
  80.          57,108,68,119,Do_PIFEdit,Temp,Temp,    {PIF Editor icon}
  81.          72,123,145,135,Do_SysEdit,Temp,Temp,    {SysEdit button}
  82.          57,123,68,134,Do_SysEdit,Temp,Temp)    {SysEdit icon}
  83.  
  84. {Wait for input}
  85. Wait_for_Input:
  86.     SetWaitMode(NULL)
  87.     WaitInput()
  88.  
  89. Do_Notepad:
  90.     SetWaitMode(FOCUS)
  91.     Run("NOTEPAD")
  92.     WaitInput(1)
  93.     Goto Wait_for_Input
  94.  
  95. Do_Write:
  96.     SetWaitMode(FOCUS)
  97.     Run("WRITE")
  98.     WaitInput(1)
  99.     Goto Wait_for_Input
  100.  
  101. Do_Paintbrush:
  102.     SetWaitMode(FOCUS)
  103.     Run("PBRUSH")
  104.     WaitInput(1)
  105.     Goto Wait_for_Input
  106.  
  107. Do_Cardfile:
  108.     SetWaitMode(FOCUS)
  109.     Run("CARDFILE")
  110.     WaitInput(1)
  111.     Goto Wait_for_Input
  112.  
  113. Do_PIFEdit:
  114.     SetWaitMode(FOCUS)
  115.     Run("PIFEDIT")
  116.     WaitInput(1)
  117.         Goto Wait_for_Input
  118.  
  119. Do_SysEdit:
  120.     SetWaitMode(FOCUS)
  121.     Run("SYSEDIT")
  122.     WaitInput(1)
  123.     Goto Wait_for_Input
  124.  
  125. Shut_Down:
  126.     End